package com.derive.education_service.web.platform.service;

import com.derive.education_service.common.global.Paper;
import com.derive.education_service.common.global.ResponseMessage;
import com.derive.education_service.entity.Platform;
import com.derive.education_service.web.platform.bean.dto.PlatformAdd;
import com.derive.education_service.web.platform.bean.dto.PlatformResAdd;
import com.derive.education_service.web.platform.bean.dto.PlatformUp;
import com.derive.education_service.web.platform.bean.dto.QueryParam;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;


/**
 * 机构操作接口
 */
@Component
public interface PlatformService {
    // 新增机构
    ResponseMessage addPlatform(MultipartFile file, PlatformAdd platformAdd);

    // 新增机构资源 -- 带机构id
    ResponseMessage addPlatformRes(List<MultipartFile> files, PlatformResAdd platformResAdd);

    // 删除机构 -- 机构信息+机构资源信息+内容关联信息
    ResponseMessage delPlatform(Integer platformId);

    // 删除机构资源数据 -- 资源id
    ResponseMessage delPlatformResByPrId(Integer prId);

    // 查询服务平台所有机构 -- 分页参数 -- 按条件
    Paper<Platform> getPlatformList(QueryParam queryParam);

    // 根据id查询机构详细信息
    ResponseMessage getPlatformInfoById(Integer platformId);

    // 编辑机构信息
    ResponseMessage upPlatformById(MultipartFile file, PlatformUp platformUp);
}
